<?php
namespace Home\Controller;
use Think\Controller;

class IndexController extends Controller {
    public function index(){    
			$paper = M('Paper');
    	$data = $paper -> select();
			$this->assign('data',$data);  		
      $this->display('index');
    }
    public function stick(){
			$paper = M('Paper');
			if(IS_POST){
			    if($paper->create()){
						 $data['content'] = I('post.content');
		    		 $paper->add($data);
			    }
			    $data = $paper -> select();
		    	}
	$data = $paper -> select();
	$this->assign('data',$data);
        $this->display('stick');
    }	
}
